/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.volatileengine.material.states;

import com.volatileengine.scene.Light;

/**
 * 
 * @author Administrator
 */
public class LightRenderState extends RenderState {

	private Light[] lightList;

	private LightRenderState() {
		lightList = new Light[8];
	}

	public void addLight(Light l) {
		boolean found = false;
		for (int i = 0; i < lightList.length; i++) {
			if (lightList[i] == null) {
				found = true;
				lightList[i] = l;
			}
		}

		if (found == false) {
			Light[] newList = new Light[lightList.length + 1];
			System.arraycopy(lightList, 0, newList, 0, lightList.length);
		}
	}

	public Light[] getLightList() {
		return lightList;
	}
}
